<%-- <%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@ page import="org.jfree.chart.ChartFactory" %>
<%@ page import="org.jfree.chart.ChartUtilities" %>
<%@ page import="org.jfree.chart.JFreeChart" %>
<%@ page import="org.jfree.chart.plot.PlotOrientation"%>
<%@ page import="org.jfree.data.*" %>
<%@ page import="org.jfree.data.jdbc.JDBCCategoryDataset"%> --%>
<%@page import="ChartDirector.*" %>

<!DOCTYPE html><!-- old -->

<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0" />
<title>Invest Works</title>
<link rel="shortcut icon" type="image/x-icon"
	href="css/images/favicon.ico" />
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<link
	href='http://fonts.googleapis.com/css?family=Raleway:400,900,800,700,600,500,300,200,100'
	rel='stylesheet' type='text/css'>

<script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>

<script src="js/jquery.carouFredSel-5.5.0-packed.js"
	type="text/javascript"></script>
<script src="js/functions.js" type="text/javascript"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>

<script
	src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js"
	type="text/javascript"></script>
<style type="text/css">
@import
	url("http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css")
	;

</style>

<script type="text/javascript">
	function load() {

		var feed = "http://economictimes.indiatimes.com/TV/Markets/rssfeedsvideo/4413330.cms";

		new GFdynamicFeedControl(feed, "feedControl");

	}

	google.load("feeds", "1");

	google.setOnLoadCallback(load);
</script>


<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Vollkorn'
	rel='stylesheet' type='text/css'>

<script>

function go(id, t){	
	//animate to the div id.
	$(".contentbox-wrapper").animate({"left": -($(id).position().left)}, 600);
	
	// remove "active" class from all links inside #slidelink
    $('#slidelink a').removeClass('active');
	
	// add active class to the current link
    $(t).addClass('active');	
}

</script>

<script type="text/javascript">

function retrieve(){
	 var xmlhttp;
		if (window.XMLHttpRequest)
		  {// code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlhttp=new XMLHttpRequest();
		  }
		else
		  {// code for IE6, IE5
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		  }
		
		xmlhttp.onreadystatechange=function()
		  {
			//document.getElementById("namediv").innerHTML="";
		  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		    {
			 document.getElementById("questiondiv").innerHTML=xmlhttp.responseText;
		    }
		  
		  if (xmlhttp.status==500)
		    {
		   alert("ERROR");
		    }
		  }
		xmlhttp.open("GET","pollservlet.htm",true);
		// document.getElementById("namediv").innerHTML="";
		xmlhttp.send();
	 
}
</script>

</head>


<body onload="retrieve();">
	<!-- wrapper -->
	<div id="wrapper">
		<!-- shell -->
		<div class="shell">
			<!-- container -->
			<div class="container">
				 <!-- header -->
				<script>
					<%@include file="header.jsp" %>
				</script>	
				<!-- end of header -->

				<div id="wrap">
					<div id="content">

						<div class="contentbox-wrapper">

							<div id="image1" class="contentbox">
								<img src="slide1.png" />
							</div>

							<div id="image2" class="contentbox">
								<img src="slide2.png" />
							</div>

							<div id="image3" class="contentbox">
								<img src="slide3.png" />
							</div>

							<div id="image4" class="contentbox">
								<img src="slide4.png" />
							</div>

							<div id="image5" class="contentbox">
								<img src="slide5.png" />
							</div>

							<div id="image6" class="contentbox">
								<img src="slide6.png" />
							</div>

							<div id="image7" class="contentbox">
								<img src="slide7.png" />
							</div>


						</div>
					</div>

					<div id="slidelink">
						<a class="active" href="#" onClick="go('#image1, this); return false">1</a>&nbsp;&nbsp;&nbsp;
					    <a href="#" onClick="go('#image2', this); return false">2</a>&nbsp;&nbsp;&nbsp;
						<a href="#" onClick="go('#image3', this); return false">3</a>&nbsp;&nbsp;&nbsp;
						<a href="#" onClick="go('#image4', this); return false">4</a>&nbsp;&nbsp;&nbsp; 
						<a href="#" onClick="go('#image5', this); return false">5</a>&nbsp;&nbsp;&nbsp;
						<a href="#" onClick="go('#image6', this); return false">6</a>&nbsp;&nbsp;&nbsp;
						<a href="#" onClick="go('#image7', this); return false">7</a>&nbsp;&nbsp;&nbsp;

					</div>
				</div>

				<!-- main -->
				<div id="template">
					<div id="left">
						<div id="tl">
							<!--<h1> I m Top Left </h1>-->
							<!-- <h2>POLL</h2>
							Do you expect a rate cut in the month of june? <br /> <input
								type="radio" name="yes">YES</br> <input type="radio"
								name="no">NO</br> <input type="radio" name="cantsay">Can't
							Say</br> <input type="button" name="vote" value="Vote"> <input
								type="button" name="result" value="Result"> -->



							<h2>POLL</h2>
							<form action="./pollresult.htm">
								<%
									if (session.getAttribute("SYes") == null) {
										System.out.println("NULLLLLLL");
										///response.sendRedirect("./index.jsp");
								%>
								<span id="questiondiv"></span> <br /> <input type="radio"
									name="choice" value=1>YES</br> <input type="radio"
									name="choice" value=2>NO</br> <input type="radio"
									name="choice" value=3>Can't Say</br> <input type="submit"
									name="vote" value="Vote"> <input type="button"
									name="result" value="Result">
								<%
									} else {
								%>
								<span id="questiondiv"></span>
								<%
									String yes = (String) session.getAttribute("SYes");
								%>
								<%
									String no = (String) session.getAttribute("SNo");
								%>
								<%
									String cantsay = (String) session.getAttribute("SCantSay");
								double ys=Double.parseDouble(yes);
								double n=Double.parseDouble(no);
								double cs=Double.parseDouble(cantsay);

								double[] data = {ys,n,cs};
								String[] labels = {"Yes", "No", "Can't Say"};
								int[] colors = {0xb8bc9c, 0xa0bdc4, 0x999966};
								XYChart c = new XYChart(300, 200,  0x00B7FF, -1, 2);
								c.addTitle("Poll Result", "Arial Bold", 10).setBackground(Chart.metalColor(
									    0x00B7FF), -1, 1);
								c.setPlotArea(30, 30, 250, 120);

								// Add a multi-color bar chart layer using the given data and colors. Use a 1 pixel
								// 3D border for the bars.
								c.addBarLayer3(data, colors).setBorderColor(-1, 1);

								// Set the labels on the x axis.
								c.xAxis().setLabels(labels);

								// Output the chart
								String chart1URL = c.makeSession(request, "chart1");
								String imageMap1 = c.getHTMLImageMap("", "", "title='{xLabel}: {value} GBytes'");
								
								%>
								<img src='<%=response.encodeURL("getchart.jsp?"+chart1URL)%>'
    							usemap="#map1" border="0">
								<map name="map1"><%=imageMap1%></map>
<%-- 								<br /> Yes--------><%=yes%></br> No---------><%=no%></br> CantSay------><%=cantsay%></br>
 --%>								<%
									}
								%>
							</form>





						</div>

						<div id="trr">
							<h2>SENSEX VIEW</h2>
							SENSEX view </br> SENSEX : 19429.23 * -90.26 (-0.46 %)
						</div>

						<div id="bl">
							<!--<h1> I m Bottom Left </h1>-->
							<h2>Market Report</h2>
							<div id="body">
								<div id="feedControl">Loading...</div>
							</div>
						</div>

						<div id="brr">
							<!--<h1> I m Bottom Right </h1>-->
							<h2>Latest News</h2>
							Asia-Pacific News<> Japan's Abe Unveils Plans to Cut Taxes</br> US and
							China Remain Divided on Cyberspying</br> China Data: Latest Figures
							Fuel Weakness Fears
						</div>
					</div>

					<div class="cl">&nbsp;</div>
					<div id="right">
						<!--<h1> I m Right Div </h1>-->
						<h2>Did You Know?</h2>
						l In the last couple of years equity markets saw higher returns
						than real estate.</br> l Over the last 10 years bond and equity funds
						would have given similar returns. </br> l Costs of investing in listed
						securities is much less than costs of investing in other assets.</br> l
						15% annualized returns would ensure money doubles in less than
						five years.</br> l Primary reason for investors losing money is that
						they aim for unrealistic high returns.</br>
					</div>

				</div>

				<!-- end of main -->
				<div class="cl">&nbsp;</div>

					<!-- footer -->
				<script>
					<%@include file="footer.jsp" %>
				</script>	
				<!-- end of footer -->

				

			</div>
			<!-- end of container -->
		</div>
		<!-- end of shell -->
	</div>
	<!-- end of wrapper -->
</body>
</html>